{:W("Main",array('module'=>MODULE_NAME,'action'=>ACTION_NAME))}

<div class="layout-main">    
    <div id="breadclumb" class="box">
        <h3><strong>{:lang('breadclumb_colon')}</strong>{:lang(MODULE_NAME)}<span></span>{$_GET.id|getFields="Item","name",###}<span></span>{:lang('comments')}</h3>
    </div>
    <div id="CooperationMain" class="box clear-fix">   
        <div class="layout-block-header">
            <button type="button" onclick="commentsEdit('{$_GET.id}',0)" class="btn btn-ok">{:lang('add_comments')}</button>
            <button type="button" onclick="commentsUpload('{$_GET.id}')" class="btn btn-ok">{:lang('bulk_upload')}</button>
        </div>
        
		<form action="{:U('Item/todo')}" method="post" id="deleteform">
        <div class="ui-table">
            <div class="ui-table-body ui-table-body-hover">
                <table cellpadding="0" cellspacing="0" width="100%" >
                    <thead>
                        <tr class="ui-table-head">
							<th class="ui-table-hcell" width="20"><input type="checkbox" id="check_box" onclick="$.Select.All(this,'id[]');" ></th>
                            <th class="ui-table-hcell" width="80">{:lang('name')}</th>
                            <th class="ui-table-hcell" width="80">{:lang('mobile')}</th>
                            <th class="ui-table-hcell" width="80">{:lang('region')}</th>
                            <th class="ui-table-hcell">{:lang('comments')}</th>
							<th class="ui-table-hcell">{:lang('reply_comments')}</th>
							<th class="ui-table-hcell" width="120">{:lang('time')}</th>
							<th class="ui-table-hcell" width="50">{:lang('status')}</th>
                            <th class="ui-table-hcell" width="100">{:lang('action')}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <volist name="list" id="vo">
                        <tr id="row-{$vo.id}">
							<td><input type="checkbox" name="id[]" value="{$vo.id}" onclick="$.Select.This(this);"></td>
                            <td>{$vo.name}</td>
                            <td>{$vo.mobile}</td>
                            <td>{$vo.region}</td>
                            <td>{$vo.content}</td>
                            <td>{$vo.reply_content}</td>
                            <td>{$vo.add_time}</td>
                            <td>{$vo.status|status="image"}</td>
                            <td class="action">
                                <q onclick="javascript:Delete('{$vo.id}','{:U('Item/proccess/',array('do'=>'delete','module'=>'Comments','id'=>$vo['id']))}')">{:lang('delete')}</q> |
                                <q onclick="commentsEdit('{$_GET.id}','{$vo.id}')">{:lang('modify')}</q>
                            </td>
                        </tr>
                        </volist>
                    </tbody>
                </table>
            </div>
        </div>
          
        <div class="ui-pager-bar clearfix" style="padding-left:10px;">
			<div class="float-left">
				<input type="hidden" name="model" value="Comments">
				<input type="checkbox" id="check_box" onclick="$.Select.All(this,'id[]');" >选择/反选 
				<input type="button" name="del" value="批量删除" class="btn" onclick="delConfirm()">
				<input type="submit" name="sort" value="批量排序" class="btn btn-ok">
				<input type="hidden" name="do" value="delete">
			</div>
			<div class="ui-pager" style="float:right">{$page}</div>
		</div>
		
		</form>
</div><!--.box-->
<script type="text/javascript">
function commentsEdit(item_id,comments_id){
	var url = "?m=Item&a=commentsEdit&item_id="+item_id+"&comments_id="+comments_id;
	$.open(url,{title:'修改评论',width:850,height:550})
}
function commentsUpload(item_id){
	var url = "?m=Item&a=commentsUpload&item_id="+item_id;
	$.open(url,{title:'批量导入',width:550,height:250})
}
function delConfirm(){
	$.confirm('是否要删除？',function(){ 
		$('#deleteform').submit();
	},true)
}
</script>
{:W("Foot")}   